package com.Logistics.fegin;

import com.Logistics.dto.UserDTO;
import com.Logistics.entity.User;
import com.Logistics.mycommon.tools.Result;
import com.Logistics.vo.UserVo;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@FeignClient(value = "pd-auth",path = "/user")
public interface UserFeignClient {

    /**
     * 根据id查询用户
     * @param id
     * @return
     */
    @GetMapping("userById/{id}")
    public Result<UserVo> userById(@PathVariable String id);

    /**
     * 根据name模糊查询
     * @param name
     * @return
     */
    @PostMapping("/queryUser")
    public Result<List<User>> queryUser(@RequestParam("name") String name);

    /**
     * 根据岗位角色查询user
     * @param station_id
     * @return
     */
    @GetMapping("userOrgIdRolId/{station_id}/")
    public Result userOrgIdRolId(@PathVariable String station_id);

    /**
     *根据组织地id集合查询所有用户数据
     * @param orgids
     * @return
     */
    @PostMapping("userByOrgIds")
    public Result userByOrgIds(@RequestBody List<String> orgids);

    /**
     * 根据组织id和岗位id查询用户
     * @return
     */
    @PostMapping("lists")
    public List<UserVo> lists(@RequestBody UserDTO userDTO);

    /**
     * 角色组织状态查询用户
     * @param orgids
     * @return
     */
    @PostMapping("/listUserss")
    public Result listUserss(@RequestBody List<String> orgids);

    /**
     * 角色组织状态查询用户
     * @return
     */
    @PostMapping("/listUserszzzs")
    public List<User> listUserzzzss(@RequestBody UserDTO userDTO);


}

